<template>
  <div class="base">
    <!-- <div class="base-header">
      header
    </div> -->
    <div class="base-content">
      <div class="base-menu">
        <menuc></menuc>
      </div>
      <div class="base-container">
        <div class="base-container-curtain">
          <router-view v-slot="{ Component }">
            <component :is="Component" />
          </router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import menuc from './components/base/menu.vue';
const isLeapYear = (year) => {
  if (((year % 4) == 0) && ((year % 100) != 0) || ((year % 400) == 0)) {
    return 1;
  } else {
    return 0;
  }
}
const p = (start, end) => {
  let endDate = new Date(end);
  let startDate = new Date(start);
  let startTime = startDate.getTime();
  let endTime = endDate.getTime();
  let time_dif = endTime - startTime;
  let day_times = (1000 * 60 * 60 * 24);
  let day_dif = Math.ceil(time_dif / day_times);
  let dates = [];
  for (let i = 0; i <= day_dif; i++) {
    let date = new Date(startTime + i * day_times)
    let date_str = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
    dates.push(date_str);
  }
  return dates;
}
p(new Date('2022-2-2 16:24'), new Date('2023-04-16 16:21'))
</script>

<style lang="less" scoped>
body {
  margin: 0px;
  padding: 0px;
}

.base {
  .base-header {
    height: 64px;
    box-shadow: 0px 4px 5px #f0f1f2;
  }

  .base-content {
    display: flex;
  }

  .base-menu {
    height: 100vh;
  }

  .base-container {
    flex: 1;

    .base-container-curtain {
      padding: 16px 20px;
    }
  }
}
</style>